

package com.scs.application.modules.upms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 登录日志实体对象
*/
@TableName("login_log")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@Accessors(chain = true)
public class LoginLog extends BaseEntity implements Serializable {

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /** 登录账号 */
    @NotBlank(message = "登录账号不能为空")
    @Length(min = 1, max = 30, message = "登录账号长度必须介于 1 和 30 之间")
    private String loginKey;

    /** 登录时间 */
    @NotNull(message = "登录时间不能为空")
    private java.util.Date loginTime;

    /** 登录成功标志 */
    private Boolean flagSuccess;

    /** 登录消息 */
    @Length(max = 200, message = "登录消息长度必须介于 0 和 200 之间")
    private String loginMsg;

    private String loginIp;

}
